﻿using CatHouse.Models;
using System;
using System.Collections.Generic;

namespace CatHouse.DAL
{
    public class PetShopDuLieuMau : System.Data.Entity.DropCreateDatabaseIfModelChanges<PetShopContext>
    {
        protected override void Seed(PetShopContext context)
        {
            var listAboutModels = new List<AboutModel>
            {
                new AboutModel
                {
                    Ten = "Nguyễn Thị Linh",
                    NgaySinh = new DateTime(1998, 3, 2),
                    Email = "nguyenthilinh@gmail.com",
                    ThongTinCaNhan = "...",
                    AnhChanDung = "anh_9.jpg",
                    Facebook = ""
                },
                new AboutModel
                {
                    Ten = "Nguyễn Văn Huy",
                    NgaySinh = new DateTime(1998, 3, 2),
                    Email = "nguyenthilinh@gmail.com",
                    ThongTinCaNhan = "...",
                    AnhChanDung = "anh_the9112.jpg",
                    Facebook = ""
                }
            };

            context.Abouts.AddRange(listAboutModels);
            context.SaveChanges();

            var admin = new UserModel
            {
                UserEmail = "admin@petcare.org.vn",
                Password = "48474f975022f960bc2afbe49be581e8", //"qwerty123456" 
                Name = "Thế Nghiệp"
            };
            context.Users.Add(admin);
            context.SaveChanges();
        }
    }
}